import { regularRule } from '@/utils/util'
import { configToSearch, toSearchHandle } from '@/views/datacenter/business/utils/index'

// export const baseSearchConfig = {}
// export const otherSearchConfig = {}
const tableConfig = {
	stripe: true,
	border: true,
	maxHeight: '80vh',
	columns: [
		{
			label: '评估对象',
			prop: 'name',
		},
		{ label: '证件号码', prop: 'idCard', plusXing: '2,2' },
		{ label: '联系方式', prop: 'contactPhone', plusXing: '5,2' },
		{ label: '评估员', prop: 'assessorName' },
		{ label: '评估员证件号码', prop: 'assessorIdCard', plusXing: '2,2' },
		{
			label: '评估单位',
			prop: 'assessmentUnitName',
		},
		// {
		// 	label: '评估单位统一社会信用代码',
		// 	prop: 'creditCode',
		// },
		{
			label: '评估时间',
			prop: 'assessmentTime',
		},
		{
			label: '评估结果(国标)',
			prop: 'nationalAssessmentResult',
			propName: 'nationalAssessmentResultLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'ACCESS_LEVEL_COUNTRY',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '评估结果(市标)',
			prop: 'cityAssessmentResult',
			propName: 'cityAssessmentResultLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'ACCESS_LEVEL_CITY',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '居住状态',
			prop: 'livingSituation',
			propName: 'livingSituationLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'LIVE_SITUATE',
			multiple: true,
		},
		{
			label: '经济来源',
			prop: 'economicSource',
			propName: 'economicSourceLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'INCOME_SOURCE',
			multiple: true,
		},
		{
			label: '是否可信',
			prop: 'isBelievable',
			custome: 'tag',
			dicData: [
				{ label: '否', value: 0, type: 'danger' },
				{ label: '是', value: 1, type: 'success' },
			],
		},
		{
			label: '操作',
			prop: 'menu',
			width: 300,
			fixed: 'right',
		},
	],
}
const formConfig = {
	inline: false,
	labelPosition: 'left',
	labelWidth: '240px',
	showBtn: true,
	column: [
		// 评估对象基础档案
		{
			type: 'DividerHtml',
			modelValue: '评估对象基础档案',
			span: 24,
		},
		{
			label: '评估对象姓名',
			prop: 'name',
			type: 'text',
			maxlength: '20',
			showWordLimit: true,
			span: 12,
			rules: [{ required: true, message: '请输入评估对象姓名' }],
		},
		{
			label: '评估对象性别',
			prop: 'gender',
			propName: 'genderLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'GENDER',
			filterKey: 'value',
			multiple: false,
			span: 12,
			rules: [{ required: true, message: '请选择评估对象性别' }],
		},
		{
			label: '评估对象出生日期',
			prop: 'birthday',
			type: 'date',
			format: 'YYYY年MM月DD日',
			valueFormat: 'YYYY-MM-DD',
			span: 12,
			rules: [{ required: true, message: '请选择评估对象出生日期' }],
		},
		{
			label: '评估引用标准',
			prop: 'quoteStandard',
			propName: 'quoteStandardLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'ASSESS_STANDARD',
			filterKey: 'value',
			multiple: false,
			span: 12,
			rules: [{ required: true, message: '请选择评估对象性别' }],
		},
		{
			label: '评估对象身高',
			prop: 'height',
			type: 'text',
			append: '厘米',
			span: 12,
			rules: [
				{ required: true, message: '请输入评估对象身高' },
				{ validator: regularRule.number, message: '请输入正确评估对象身高' },
			],
		},
		{
			label: '评估对象体重',
			prop: 'weight',
			type: 'text',
			append: '千克',
			span: 12,
			rules: [
				{ required: true, message: '请输入评估对象体重' },
				{ validator: regularRule.number, message: '请输入正确评估对象体重' },
			],
		},
		{
			label: '评估对象民族',
			prop: 'ethnicity',
			propName: 'ethnicityLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'NATIONALITY',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '评估对象宗教信仰',
			prop: 'religion',
			propName: 'religionLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'RELIGIOUS_BELIEF',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '评估对象身份证号',
			prop: 'idCard',
			type: 'text',
			changeField: true,
			maxlength: '18',
			showWordLimit: true,
			span: 12,
			rules: [
				{ required: true, message: '请输入评估对象身份证号' },
				{ pattern: regularRule.idCard, message: '请输入正确评估对象身份证号' },
			],
		},
		{
			label: '评估对象文化程度',
			prop: 'education',
			propName: 'educationLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'EDUCATION_DEGREE',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '评估对象居住情况',
			prop: 'livingSituation',
			propName: 'livingSituationLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'LIVE_SITUATE',
			filterKey: 'value',
			multiple: true,
			span: 12,
		},
		{
			label: '评估对象婚姻状况',
			prop: 'maritalStatus',
			propName: 'maritalStatusLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'MARITAL_STATUS',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '评估对象医疗费用支付方式',
			prop: 'medicalpayment',
			propName: 'medicalpaymentLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'MEDICAL_PAY_WAY',
			filterKey: 'value',
			multiple: true,
			span: 12,
		},
		{
			label: '经济来源',
			prop: 'economicSource',
			propName: 'economicSourceLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'INCOME_SOURCE',
			filterKey: 'value',
			multiple: true,
			span: 12,
		},
		{
			label: '近30天内照护风险事件--跌倒',
			prop: 'fallRiskEvent',
			propName: 'fallRiskEventLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'NURSE_RISK',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '近30天内照护风险事件--走失',
			prop: 'wanderingRiskEvent',
			propName: 'wanderingRiskEventLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'NURSE_RISK',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '近30天内照护风险事件--噎食',
			prop: 'chokingRiskEvent',
			propName: 'chokingRiskEventLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'NURSE_RISK',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '近30天内照护风险事件--自杀、自伤',
			prop: 'suicideSelfHarm',
			propName: 'suicideSelfHarmLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'NURSE_RISK',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '近30天内照护风险事件--其他',
			prop: 'otherRiskEvent',
			propName: 'otherRiskEventLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'NURSE_RISK',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		// 信息提供者及联系人信息
		{
			type: 'DividerHtml',
			modelValue: '信息提供者及联系人信息',
			span: 24,
		},
		{
			label: '信息提供者的姓名',
			prop: 'informantName',
			type: 'text',
			maxlength: '20',
			showWordLimit: true,
			span: 12,
		},
		{
			label: '信息提供者与老年人的关系',
			prop: 'informantRelationship',
			propName: 'informantRelationshipLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'ELDERLY_RELATIONSHIP',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '联系人的姓名',
			prop: 'contactName',
			type: 'text',
			maxlength: '20',
			showWordLimit: true,
			span: 12,
		},
		{
			label: '联系人电话',
			prop: 'contactPhone',
			type: 'text',
			maxlength: '11',
			showWordLimit: true,
			span: 12,
			rules: [{ pattern: regularRule.phone, message: '请输入正确联系人电话' }],
		},
		// 健康相关情况
		{
			type: 'DividerHtml',
			modelValue: '健康相关情况',
			span: 24,
		},
		{
			label: '疾病诊断',
			prop: 'illnessDiagnosis',
			propName: 'illnessDiagnosisLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'ILLNESS_DIAGNOSE',
			filterKey: 'value',
			multiple: true,
			span: 12,
		},
		{
			label: '用药情况',
			prop: 'medicationInformation',
			type: 'textarea',
			maxlength: '140',
			showWordLimit: true,
			span: 12,
		},
		{
			label: '压力性损伤',
			prop: 'pressureInjury',
			propName: 'pressureInjuryLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'DAMAGE',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '关节活动度',
			prop: 'jointMobility',
			propName: 'jointMobilityLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'JOINT_ACTIVITY',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '伤口情况',
			prop: 'woundStatus',
			propName: 'woundStatusLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'WOUND_CONDITION',
			filterKey: 'value',
			multiple: true,
			span: 12,
		},
		{
			label: '特殊护理情况',
			prop: 'specialCare',
			propName: 'specialCareLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'NURSE_CONDITION',
			filterKey: 'value',
			multiple: true,
			span: 12,
		},
		{
			label: '疼痛感',
			prop: 'painLevel',
			propName: 'painLevelLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'ACHE',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '牙齿缺失情况',
			prop: 'teethLoss',
			propName: 'teethLossLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'TOOTH_CONDITION',
			filterKey: 'value',
			multiple: true,
			span: 12,
		},
		{
			label: '义齿佩戴情况',
			prop: 'dentureWear',
			propName: 'dentureWearLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'FALSE_TOOTH_CONDITION',
			filterKey: 'value',
			multiple: true,
			span: 12,
		},
		{
			label: '吞咽困难的情形和症状',
			prop: 'difficultySwallowing',
			propName: 'difficultySwallowingLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'SWALLOW_CONDITION',
			filterKey: 'value',
			multiple: true,
			span: 12,
		},
		// 评估档案
		{
			type: 'DividerHtml',
			modelValue: '评估档案',
			span: 24,
		},
		{
			label: '营养不良',
			prop: 'malnutrition',
			propName: 'malnutritionLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'HAVE_OR_NOT',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '清理呼吸道无效',
			prop: 'ineffective',
			propName: 'ineffectiveLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'HAVE_OR_NOT',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '昏迷',
			prop: 'coma',
			propName: 'comaLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'HAVE_OR_NOT',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '进食',
			prop: 'feedingAbility',
			propName: 'feedingAbilityLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'FEED',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '修饰',
			prop: 'personalGrooming',
			propName: 'personalGroomingLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'EMBELLIH',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '洗澡',
			prop: 'bathingSkills',
			propName: 'bathingSkillsLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'EMBELLIH',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '穿/脱上衣',
			prop: 'dressingSkills',
			propName: 'dressingSkillsLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'EMBELLIH',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '穿/脱裤子和鞋袜',
			prop: 'pantsShoe',
			propName: 'pantsShoeLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'EMBELLIH',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '小便控制',
			prop: 'urinaryContinence',
			propName: 'urinaryContinenceLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'PEE_CONTROL',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '大便控制',
			prop: 'bowelContinence',
			propName: 'bowelContinenceLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'EXCREMENTT_CONTROL',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '如厕',
			prop: 'toiletingSkills',
			propName: 'toiletingSkillsLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'EMBELLIH',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '床上体位转移',
			prop: 'bedPosition',
			propName: 'bedPositionLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'EMBELLIH',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '床椅转移',
			prop: 'bedChair',
			propName: 'bedChairLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'EMBELLIH',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '平地行走',
			prop: 'ambulationSkills',
			propName: 'ambulationSkillsLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'FLAT_WALK',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '上下楼梯',
			prop: 'stairsClimbing',
			propName: 'stairsClimbingLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'STAIRS',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '时间定向',
			prop: 'timeOrientation',
			propName: 'timeOrientationLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'TIME_DIRECTED',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '空间定向',
			prop: 'spaceOrientation',
			propName: 'spaceOrientationLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'INTERSPACE_DIRECTED',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '人物定向',
			prop: 'personOrientation',
			propName: 'personOrientationLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'FIGURE_DIRECTED',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '记忆',
			prop: 'memoryAbility',
			propName: 'memoryAbilityLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'MEMORY',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '理解能力',
			prop: 'comprehensionAbility',
			propName: 'comprehensionAbilityLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'CAPACITY_LEVEL',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '表达能力',
			prop: 'expressionAbility',
			propName: 'expressionAbilityLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'VOICE_LEVEL',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '攻击行为',
			prop: 'aggressiveBehavior',
			propName: 'aggressiveBehaviorLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'ATTACK_BEHAVIOR',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '抑郁症状',
			prop: 'depressionSymptoms',
			propName: 'depressionSymptomsLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'DEPRESSED_SYMPTOM',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '意识水平',
			prop: 'consciousnessLevel',
			propName: 'consciousnessLevelLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'AWARENESS_LEVEL',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '视力',
			prop: 'visualAbility',
			propName: 'visualAbilityLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'VISION',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '听力',
			prop: 'hearingAbility',
			propName: 'hearingAbilityLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'HEARING',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '执行日常事务',
			prop: 'dailyManagement',
			propName: 'dailyManagementLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'DAILY_LIFE',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '使用交通工具外出',
			prop: 'transportation',
			propName: 'transportationLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'VEHICLE',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '社会交往能力',
			prop: 'socialAbility',
			propName: 'socialAbilityLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'CONTECT_LEVEL',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},
		{
			label: '评估总分',
			prop: 'assessTotal',
			type: 'text',
			span: 12,
			rules: [
				{ required: true, message: '请输入评估总分' },
				{ pattern: /^[0-9]*$/, message: '请输入正确评估总分' },
			],
		},
		// 评估结果
		{
			type: 'DividerHtml',
			modelValue: '评估结果',
			span: 24,
		},
		{
			label: '评估地点',
			prop: 'assessmentLocation',
			type: 'textarea',
			maxlength: '140',
			showWordLimit: true,
			span: 24,
			rules: [{ required: true, message: '请输入评估地点' }],
		},
		{
			label: '评估结果(国标)',
			prop: 'nationalAssessmentResult',
			propName: 'nationalAssessmentResultLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'ACCESS_LEVEL_COUNTRY',
			filterKey: 'value',
			multiple: false,
			span:8,
		},
		{
			label: '评估结果(市标)',
			prop: 'cityAssessmentResult',
			propName: 'cityAssessmentResultLabel',
			type: 'remoteSelect',
			api: 'getDictItemList',
			code: 'ACCESS_LEVEL_CITY',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '评估人员1姓名',
			prop: 'assessorName',
			type: 'text',
			maxlength: '20',
			showWordLimit: true,
			span: 12,
			rules: [{ required: true, message: '请输入评估人员1姓名' }],
		},
		{
			label: '评估人员2姓名',
			prop: 'secondAssessorName',
			type: 'text',
			maxlength: '20',
			showWordLimit: true,
			span: 8,
			rules: [{ required: true, message: '请输入评估人员2姓名' }],
		},
		{
			label: '评估人员证件号',
			prop: 'assessorIdCard',
			type: 'text',
			maxlength: '18',
			showWordLimit: true,
			span: 8,
			rules: [
				{ required: true, message: '请输入评估人员姓名' },
				{ pattern: regularRule.idCard, message: '请输入正确评估人员证件号' },
			],
		},
		{
			label: '评估单位名称',
			prop: 'assessmentUnitName',
			type: 'text',
			maxlength: '50',
			showWordLimit: true,
			span: 8,
			rules: [{ required: true, message: '请输入评估单位名称' }],
		},
		{
			label: '评估单位统一社会信用代码',
			prop: 'creditCode',
			type: 'text',
			maxlength: '18',
			showWordLimit: true,
			span: 8,
			rules: [
				{ required: true, message: '输入评估单位统一社会信用代码' },
				{ pattern: regularRule.code, message: '输入正确评估单位统一社会信用代码' },
			],
		},
		{
			label: '评估时间',
			prop: 'assessmentTime',
			type: 'datetime',
			format: 'YYYY年MM月DD日 HH时mm分ss秒',
			valueFormat: 'YYYY-MM-DD HH:mm:ss',
			span: 8,
			rules: [{ required: true, message: '请输入评估时间' }],
		},
	],
}

const moreSearchConfig: any = {
	inline: true,
	showBtn: false,
	labelPosition: 'left',
	column: [...configToSearch(formConfig.column)],
}
// 处理成详情需要的三行展示
let coyColumn = JSON.parse(JSON.stringify(formConfig.column))
coyColumn.forEach((el) => {
	if (el.type != 'DividerHtml') {
		el.span = 8
	}
})
export const detailConfig = {
	showBtn: false,
	inline: false,
	labelPosition: 'left',
	column: coyColumn,
}
export const baseConfig = {
	pageName: '老年人能力评估',
	dictcodes: [
		'ASSESS_STANDARD',
		'MEDICAL_PAY_WAY',
		'NURSE_RISK',
		'ILLNESS_DIAGNOSE',
		'DAMAGE',
		'JOINT_ACTIVITY',
		'WOUND_CONDITION',
		'NURSE_CONDITION',
		'ACHE',
		'HAVE_OR_NOT',
		'EMBELLIH',
		'PEE_CONTROL',
		'EXCREMENTT_CONTROL',
		'STAIRS',
		'FLAT_WALK',
		'TIME_DIRECTED',
		'INTERSPACE_DIRECTED',
		'FIGURE_DIRECTED',
		'MEMORY',
		'CAPACITY_LEVEL',
		'VOICE_LEVEL',
		'ATTACK_BEHAVIOR',
		'DEPRESSED_SYMPTOM',
		'AWARENESS_LEVEL',
		'VISION',
		'HEARING',
		'DAILY_LIFE',
		'VEHICLE',
		'CONTECT_LEVEL',

		'TOOTH_CONDITION',
		'FALSE_TOOTH_CONDITION',
		'SWALLOW_CONDITION',
		'FEED',
		'GENDER',
		'NATIONALITY',
		'RELIGIOUS_BELIEF',
		'EDUCATION_DEGREE',
		'LIVE_SITUATE',
		'MARITAL_STATUS',
		'INCOME_SOURCE',
		'ELDERLY_RELATIONSHIP',
		'ACCESS_LEVEL_CITY',
		'ACCESS_LEVEL_COUNTRY',
	],
	rowKey: 'id',
	addLabel: '添加',
	tipLabel: 'name',
	exportMqTopic: '/ning/export/',
	api: {
		moreSearch: 'view_dpElderlyAssessment_search',
		add: 'dpElderlyAssessment_add',
		edit: 'dpElderlyAssessment_edit',
		index: 'dpElderlyAssessment_page',
		delete: 'dpElderlyAssessment_del',
		export: 'dpElderlyAssessment_export',
		import: 'dpElderlyAssessment_import',
	},
	paramsObj: {
		code: 2023,
	},
	auth: {
		// add: 'view_dpElderlyAssessment_add',
		// edit: 'view_dpElderlyAssessment_edit',
		index: 'view_dpElderlyAssessment_page',
		delete: 'view_dpElderlyAssessment_del',
		mulitSet: 'mulitSet',
		// export: 'view_dpElderlyAssessment_export',
		// import: 'view_dpElderlyAssessment_import',
	},
	menuBtn: [
		{
			icon: 'editor',
			label: '查看档案',
			type: 'primary',
			operate: 'detail',
			auth: '',
			text: true,
			show: true,
		},
		// {
		// 	icon: 'editor',
		// 	label: '编辑',
		// 	type: 'primary',
		// 	operate: 'edit',
		// 	auth: 'view_dpElderlyAssessment_edit',
		// 	text: true,
		// 	show: true,
		// },
	],
	saveFormate: async (form) => {
		return new Promise((resolve, reject) => {
			resolve(form)
		})
	},
	dialogConfig: {
		width: '90%',
		// fullscreen: true
	},
	moreSearchConfig,
	searchConfig: {
		inline: true,
		showBtn: true,
		labelPosition: 'left',
		column: [
			{
				label: '证件号码',
				prop: 'idCard',
				type: 'input',
				span: 6,
			},
			{
				label: '评估对象',
				prop: 'name',
				span: 6,
			},
			{
				label: '联系方式',
				prop: 'contactPhone',
				type: 'input',
				span: 6,
			},
			{
				label: '居住状态',
				prop: 'livingSituation',
				propName: 'livingSituationLabel',
				type: 'remoteSelect',
				api: 'getDictItemList',
				code: 'LIVE_SITUATE',
				filterKey: 'value',
				multiple: false,
				span: 6,
			},
			{
				label: '评估单位',
				prop: 'assessmentUnitName',
				type: 'input',
				span: 6,
			},
			{
				label: '评估人员',
				prop: 'assessorName',
				type: 'input',
				span: 6,
			},
			{
				label: '评估结果(国标)',
				prop: 'nationalAssessmentResult',
				propName: 'nationalAssessmentResultLabel',
				type: 'remoteSelect',
				api: 'getDictItemList',
				code: 'ACCESS_LEVEL_COUNTRY',
				filterKey: 'value',
				multiple: false,
				span: 6,
			},
			{
				label: '评估结果(市标)',
				prop: 'cityAssessmentResult',
				propName: 'cityAssessmentResultLabel',
				type: 'remoteSelect',
				api: 'getDictItemList',
				code: 'ACCESS_LEVEL_CITY',
				filterKey: 'value',
				multiple: false,
				span: 6,
			},
			{
				label: '评估时间',
				prop: 'assessmentTime',
				type: 'datetime',
				format: 'YYYY年MM月DD日 HH时mm分ss秒',
				valueFormat: 'YYYY-MM-DD HH:mm:ss',
				span: 6,
			},
		],
	},
	tableConfig,
	detailConfig,
	formConfig,
	beforeOnLoadFormate: async (params) => {
		params = toSearchHandle(moreSearchConfig, {}, params)
		return Promise.resolve({
			...params,
		})
	},
	onLoadFormate: async (arr) => {
		const tableData = arr.map((item) => {
			return {
				...item,
			}
		})
		console.log(tableData, 'tableData')
		return Promise.resolve(Object.freeze(tableData))
	},
}
